package start;

import jade.core.Profile;
import jade.core.ProfileImpl;
import jade.core.Runtime;
import jade.wrapper.AgentController;
import jade.wrapper.ContainerController;
import jade.wrapper.StaleProxyException;

/**
 * von Simon Jakubowski, Philipp Geers, Tobias Meyer
 */
public class StartUp {

    static Runtime runtime;
    static ContainerController container;
    static Profile profile;

    public static void main(String[] args) {
        try {
           runtime = Runtime.instance();
           profile = new ProfileImpl();
           profile.setParameter("gui", "true");
           container = runtime.createMainContainer(profile);
           

            // Administrator initialisieren und starten
            AgentController admin = container.createNewAgent("Administrator", "agents.AdministratorAgent", null);
            admin.start();

            // vier user initialisieren und starten
            for (int i = 0; i < 1; i++) {
                AgentController user = container.createNewAgent("Spieler" + i, "agents.SimplePlayerAgent", null);
                user.start();
            }
            
            AgentController user = container.createNewAgent("ProfiSpieler1", "agents.AdvancedPlayerAgent", null);
            user.start();
            
            user = container.createNewAgent("ProfiSpieler2", "agents.AdvancedPlayerAgent", null);
            user.start();

        } catch (StaleProxyException e) {
            e.printStackTrace();
        }
    }
}
